package com.eorchis.module.classcourse.ui.commond;

import java.io.Serializable;

import com.eorchis.core.basedao.entity.IBaseEntity;
import com.eorchis.core.ui.commond.ICommond;
import com.eorchis.module.basedata.domain.BaseData;
import com.eorchis.module.classcourse.domain.ClassCourse;
import com.eorchis.utils.utils.PropertyUtil;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.hibernate.validator.constraints.NotBlank;


/**
 * Title: ClassCourseValidCommond<br>
 * Description: 班级课程维护ValidCommond<br>
 * Company: GoldGov<br>
 * Copyright @ 2012 GoldGov .All rights reserved.<br>
 * @author Max
 * @createDate 2014-12-11
 * @version $Revision$
 */
public class ClassCourseValidCommond implements ICommond {
	private Boolean importFlag = true;//验证状态
	private String reason = null;	//错误信息
	private ClassCourse classCourse;
	private String speakway;
	private String classId;
	private String searchCourseNum;
	private Integer row =new Integer(0);
	
	private String speakDateStr;//日期  wtbwbb(委托部委办班)
	private String speakTime;//上午、下午   wtbwbb(委托部委办班)
	private String []courseIds;
	
	public ClassCourseValidCommond(){
		classCourse = new ClassCourse();
	}
	
	public ClassCourseValidCommond(ClassCourse classCourse){
		this.classCourse = classCourse;
	}

	public Serializable getEntityID() {
		return classCourse.getClassCourseId();
	}

	public IBaseEntity toEntity() {
		return classCourse;
	}

	/**
	 * 获取ID
	 */	
	public String getClassCourseId() {
		return classCourse.getClassCourseId();
	}
	/**
	 * 设置ID
	 */		
	public void setClassCourseId(String classCourseId) {
		classCourse.setClassCourseId(classCourseId);
	}
	/**
	 * 获取名称
	 */	
	public String getCourseName() {
		return classCourse.getCourseName();
	}
	/**
	 * 设置名称
	 */		
	public void setCourseName(String courseName) {
		classCourse.setCourseName(courseName);
	}
	/**
	 * 获取库存的数量
	 */	
	public String getCourseNum() {
		return classCourse.getCourseNum();
	}
	/**
	 * 设置库存的数量
	 */		
	public void setCourseNum(String courseNum) {
		classCourse.setCourseNum(courseNum);
	}
	/**
	 * 获取学时
	 */	
	public Double getStudyScore() {
		return classCourse.getStudyScore();
	}
	/**
	 * 设置学时
	 */		
	public void setStudyScore(Double studyScore) {
		classCourse.setStudyScore(studyScore);
	}
	/**
	 * 获取多个讲师用逗号分隔
	 */	
	public String getSpeaker() {
		return classCourse.getSpeaker();
	}
	/**
	 * 设置多个讲师用逗号分隔
	 */		
	public void setSpeaker(String speaker) {
		classCourse.setSpeaker(speaker);
	}
	/**
	 * 获取备注
	 */	
	public String getDutyRemark() {
		return classCourse.getDutyRemark();
	}
	/**
	 * 设置备注
	 */		
	public void setDutyRemark(String dutyRemark) {
		classCourse.setDutyRemark(dutyRemark);
	}
	/**
	 * 获取讲师部门
	 */	
	public String getSpeakdept() {
		return classCourse.getSpeakdept();
	}
	/**
	 * 设置讲师部门
	 */		
	public void setSpeakdept(String speakdept) {
		classCourse.setSpeakdept(speakdept);
	}
	
	/**
	 * 获取内容
	 */	
	public String getContent() {
		return classCourse.getContent();
	}
	/**
	 * 设置内容
	 */		
	public void setContent(String content) {
		classCourse.setContent(content);
	}
	
	/**
	 * 获取内容
	 */	
	public Date getCreateDate() {
		return classCourse.getCreateDate();
	}
	/**
	 * 设置内容
	 */		
	public void setCreateDate(Date content) {
		classCourse.setCreateDate(content);
	}
	
	
//	/**
//	 * 获取培训班ID
//	 */	
//	@NotBlank
//	public String getClassId() {
//		return classCourse.getClassId();
//	}
//	/**
//	 * 设置培训班ID
//	 */		
//	public void setClassId(String classId) {
//		classCourse.setClassId(classId);
//	}

	public String getSpeakway() {
		return speakway;
	}

	public void setSpeakway(String speakway) {
		this.speakway = speakway;
	}

	public String getClassId() {
		return classId;
	}

	public void setClassId(String classId) {
		this.classId = classId;
	}

	public String getSearchCourseNum() {
		return searchCourseNum;
	}

	public void setSearchCourseNum(String searchCourseNum) {
		this.searchCourseNum = searchCourseNum;
	}
	
	
	
	public String getSpeakDuty() {
		return classCourse.getSpeakDuty();
	}
	public void setSpeakDuty(String speakDuty) {
		classCourse.setSpeakDuty(speakDuty);
	}

	public String getSpeakDateStr() {
		return speakDateStr;
	}

	public void setSpeakDateStr(String speakDateStr) {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
		try {
			if(PropertyUtil.objectNotEmpty(speakDateStr)){
				classCourse.setSpeakDate(sdf.parse(speakDateStr));
			}
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		this.speakDateStr = speakDateStr;
	}

	public String getSpeakTime() {
		return speakTime;
	}

	public void setSpeakTime(String speakTime) {
		this.speakTime = speakTime;
	}
	public Boolean getImportFlag() {
		return importFlag;
	}

	public void setImportFlag(Boolean importFlag) {
		this.importFlag = importFlag;
	}

	public String getReason() {
		return reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}

	public Integer getRow() {
		return row;
	}

	public void setRow(Integer row) {
		this.row = row;
	}

	public String [] getCourseIds() {
		return courseIds;
	}

	public void setCourseIds(String [] courseIds) {
		this.courseIds = courseIds;
	}
	
}
